package com.jx.lcs.knowledge.dao;

import org.springframework.stereotype.Repository;

import com.jx.lcs.knowledge.entity.KnowledgeInfo;
import com.tianyu.jty.common.persistence.HibernateDao;

/**
 * @author 陈新雷 2015年7月2日下午4:09:53
 *
 */
@Repository
public class KnowledgeInfoDao extends HibernateDao<KnowledgeInfo, String> {
	/*@SuppressWarnings({ "unchecked", "rawtypes" })
	public List<KnowledgeInfo> findAll()  {
		List tem=new ArrayList();
		try {
			StringBuffer sb = new StringBuffer();
			sb.append("SELECT * FROM tb_knowledge_info ");
			SQLQuery sqlQuery = createSQLQuery(sb.toString());
			// sqlQuery.addScalar("id",StandardBasicTypes.INTEGER );
			// sqlQuery.addScalar("pid", StandardBasicTypes.INTEGER);
			// sqlQuery.addScalar("name",StandardBasicTypes.STRING);
			// sqlQuery.addScalar("url",StandardBasicTypes.STRING);
			// sqlQuery.addScalar("icon",StandardBasicTypes.STRING);
			// sqlQuery.addScalar("sort",StandardBasicTypes.INTEGER);
			// sqlQuery.addScalar("description",StandardBasicTypes.STRING);
			sqlQuery.setResultTransformer(Transformers
					.aliasToBean(KnowledgeInfo.class));
			// sqlQuery.setCacheable(true);
			 tem = sqlQuery.list();
			System.out.println(tem.size());
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	
		return tem;
	}*/
}
